package com.magnificent.atlantis.common.entity.messages;

import java.util.ArrayList;
import java.util.Date;

/**
 * User: Babanin
 * Date: 04.05.2009
 * Time: 21:57:50
 */
public class ServerNewMeetingMessage extends ServerMessage {
    private String title;
    private String message;
    private ArrayList<Integer> invitedUsers;
    protected Date date;

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public ArrayList<Integer> getInvitedUsers() {
        return invitedUsers;
    }

    public void setInvitedUsers(ArrayList<Integer> invitedUsers) {
        this.invitedUsers = invitedUsers;
    }

    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ServerNewMeetingMessage that = (ServerNewMeetingMessage) o;

        if (date != null ? !date.equals(that.date) : that.date != null) return false;
        if (invitedUsers != null ? !invitedUsers.equals(that.invitedUsers) : that.invitedUsers != null) return false;
        if (message != null ? !message.equals(that.message) : that.message != null) return false;
        if (title != null ? !title.equals(that.title) : that.title != null) return false;

        return true;
    }

    public int hashCode() {
        int result;
        result = (date != null ? date.hashCode() : 0);
        result = 31 * result + (title != null ? title.hashCode() : 0);
        result = 31 * result + (message != null ? message.hashCode() : 0);
        result = 31 * result + (invitedUsers != null ? invitedUsers.hashCode() : 0);
        return result;
    }
}
